{% extends "smra_portal/portal_template.html" %}
{% block page_id %}virts{% endblock %} 
 			
{% block leftbar %}
	{% if virtform %}
	<h1>New Collection</h1>
 	<form action="" method="post">
  		{% csrf_token %} <!--  it is very important that this token is used for all forms that POST -->
		{% for v in virtform %}
		<div class="side_row">
    		<span>{{v.label_tag}}</span> 
    		<span>{{v}}</span>
    	</div>
		{% endfor %}
 		<div class="side_row">
			<input class="right_button" type ="submit" id="submit" name="create" value="Create">
 		</div>
		
	</form>
	{% endif %}
{% endblock leftbar %}


{% block main %}
<div class="page_title">My Collections</div>
{% if virts %}
<table class="row_set">
   	{% for v  in  virts %}
   	<tr class="{% cycle 'row_odd' 'row_even' %}">
   		<td class="data_value">#{{v.pk}}</td>
  		<td class="data_value">[{% if v.public %}Public{% else %}Private{% endif %}]&nbsp;-</td>
    	<td class="data_value">{{v.name}}</td>
    	<td class="data_value">{{v.description}}</td>
		<td class=""><a href={% url virtmeta v.pk %}>Details</a></td>
    </tr>
   {% endfor %}
</table>
{% endif %}
{% endblock main %}
